/*
package com.young.shop.api.controller;

import com.young.shop.api.service.CartsService;
import com.young.shop.pojo.entity.Carts;
import com.young.shop.pojo.qo.CartQO;
import com.young.shop.pojo.vo.Parmpacking;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.PreDestroy;
import javax.annotation.Resource;
import java.util.List;

*/
/**
 * @author LY
 * @date 2021/1/11 16:56
 *//*


@RestController
@Api(tags = "购物车的接口")
public class CartsController extends BaseController {


    @Autowired
    private CartsService cartsService;

    @RequestMapping("/addCarts")
    @ApiOperation("添加购物车")
   public Parmpacking<List<Carts>> addCarts(CartQO cartQO) {
       List<Carts> carts = cartsService.AddCarts(cartQO);
       if (carts != null) {
            return Parmpacking.success(carts);
        } else {
            return Parmpacking.error();
        }
   }

    @RequestMapping("/delete")
    @ApiOperation("商品移出购物车")
    public Parmpacking<List<Carts>> delete(long commodityId) {
        List<Carts> carts = cartsService.deleteCommodity(commodityId);
        if (carts != null) {
            return Parmpacking.success(carts);
        } else {
            return Parmpacking.error();
        }
    }

}*/
